home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / mmpp010.zip / DB.HP_ / DB.bin
Text File  |  1995-01-27  |  1KB  |  53 lines

  1. // CopyRight Maurizio Maccani 1995
  2. #ifndef _DB
  3. #define _DB
  4. struct Pool {
  5.     UINT buffer[1020];
  6.     int pointer;
  7.     Pool *nextBuffer;
  8.     Pool *lastBuffer;
  9.     Pool *firstBuffer;
  10.     public:
  11.     void New();
  12.     void Destroy();
  13.     void *Get(int i);
  14. };
  15. class GenericElement {
  16.     public:
  17.     GenericElement *nextInChain;
  18.     GenericElement *previousInChain;
  19.     GenericElement *baseInChain;
  20.     GenericElement *firstInChildChain;
  21.     GenericElement *lastInChildChain;
  22.     int AddInChain(GenericElement *toAdd);
  23.     int AddInChildChain(GenericElement *toAdd);
  24.     GenericElement *FirstInChildChain();
  25.     GenericElement *LastInChildChain();
  26.     GenericElement *BaseInChain();
  27.     GenericElement *NextInChain();
  28.     GenericElement *PreviousInChain();
  29.     GenericElement *LastInChain();
  30.     void New();
  31.     void Copy(GenericElement *);
  32. };
  33. class ListElement : public GenericElement
  34. {  
  35.   char string[30];
  36.   int prefix;
  37.   BOOL init;
  38.   public:
  39.   void New(LPSTR, int);
  40.   int GetPrefix();
  41.   LPSTR GetValue();
  42.   BOOL IsFull();
  43.   void Copy(ListElement*);
  44.   };
  45. class List {
  46.     public:
  47.     Pool startPool;
  48.     ListElement *base;
  49.     void New();
  50.     void Destroy();
  51. };              
  52. #endif
  53.